package com.hk.blog.domain;

import com.hk.core.data.jpa.domain.AbstractSnowflakeAuditable;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;


@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "t_menu")
//@TypeDef(name = JsonTypeDef.JSON, typeClass = JsonStringType.class)
public class Menu extends AbstractSnowflakeAuditable {

    private String menuName;

    private Long parentId;

    /**
     * 必须要有值，对于折叠菜单，会根据此值来解析此菜单是否为打开状态
     * 和前端route中meta.openKeys有对齐，不要随意修改
     */
    private String path;

    private String component;

    /**
     * 组件对应的meta
     */
//    @Type(type = JsonTypeDef.JSON)
    private com.hk.core.authentication.api.menus.Menu.Meta meta;

    /**
     * 排序值
     */
    @Column(name = "sort_by")
    private Integer sortBy;

    private String icon;


}
